import Vue from 'vue'
import App from './App.vue'
import router from './router'
import iView from 'iview'
import 'iview/dist/styles/iview.css'
import VueAxios from 'vue-axios'
import {instance} from './common/AxiosConfig'
import {$get,$post} from './common/AxiosRequest'
import {ResponseData} from "@/common/ResponseData";

Vue.prototype.$get = $get
Vue.prototype.$post = $post
declare module 'vue/types/vue' {
  interface Vue {
    $get(url, {},{}): Promise<ResponseData>,
    $get(url, {}): Promise<ResponseData>,
    $get(url): Promise<ResponseData>,
    $post(url): Promise<ResponseData>,
    $post(url, {}): Promise<ResponseData>,
    $post(url, {} ,{}): Promise<ResponseData>,
  }
}
Vue.config.productionTip = false;
Vue.use(iView);
Vue.use(VueAxios, instance);

new Vue({
  router,
  render: h => h(App)
}).$mount('#app');
